.class Lcom/teewoo/app/bus/ui/NearbyStationActivity$MyAdapter;
.super Landroid/widget/BaseAdapter;
.source "NearbyStationActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/teewoo/app/bus/ui/NearbyStationActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "MyAdapter"
.end annotation


# instance fields
.field inflater:Landroid/view/LayoutInflater;

.field final synthetic this$0:Lcom/teewoo/app/bus/ui/NearbyStationActivity;


# direct methods
.method public constructor <init>(Lcom/teewoo/app/bus/ui/NearbyStationActivity;Landroid/content/Context;)V
    .locals 1
    .parameter
    .parameter "context"

    .prologue
    .line 276
    iput-object p1, p0, Lcom/teewoo/app/bus/ui/NearbyStationActivity$MyAdapter;->this$0:Lcom/teewoo/app/bus/ui/NearbyStationActivity;

    .line 274
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 275
    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/teewoo/app/bus/ui/NearbyStationActivity$MyAdapter;->inflater:Landroid/view/LayoutInflater;

    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 279
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/NearbyStationActivity$MyAdapter;->this$0:Lcom/teewoo/app/bus/ui/NearbyStationActivity;

    invoke-static {v0}, Lcom/teewoo/app/bus/ui/NearbyStationActivity;->access$0(Lcom/teewoo/app/bus/ui/NearbyStationActivity;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 284
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/NearbyStationActivity$MyAdapter;->this$0:Lcom/teewoo/app/bus/ui/NearbyStationActivity;

    invoke-static {v0}, Lcom/teewoo/app/bus/ui/NearbyStationActivity;->access$0(Lcom/teewoo/app/bus/ui/NearbyStationActivity;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 289
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/NearbyStationActivity$MyAdapter;->this$0:Lcom/teewoo/app/bus/ui/NearbyStationActivity;

    invoke-static {v0}, Lcom/teewoo/app/bus/ui/NearbyStationActivity;->access$0(Lcom/teewoo/app/bus/ui/NearbyStationActivity;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/teewoo/app/bus/model/Station;

    invoke-virtual {p0}, Lcom/teewoo/app/bus/model/Station;->getId()Ljava/lang/Integer;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    int-to-long v0, v0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 13
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 294
    const/4 v12, 0x0

    .line 295
    .local v12, view:Landroid/view/View;
    if-nez p2, :cond_0

    .line 296
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/NearbyStationActivity$MyAdapter;->inflater:Landroid/view/LayoutInflater;

    const v1, 0x7f03001b

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v12

    .line 299
    :goto_0
    const/4 v0, 0x0

    invoke-virtual {v12, v0}, Landroid/view/View;->setBackgroundColor(I)V

    .line 300
    const v0, 0x7f0a0061

    invoke-virtual {v12, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v10

    check-cast v10, Landroid/widget/TextView;

    .line 302
    .local v10, numView:Landroid/widget/TextView;
    add-int/lit8 v0, p1, 0x1

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v10, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 303
    const v0, 0x7f0a0062

    invoke-virtual {v12, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v11

    check-cast v11, Landroid/widget/TextView;

    .line 304
    .local v11, txView:Landroid/widget/TextView;
    iget-object v0, p0, Lcom/teewoo/app/bus/ui/NearbyStationActivity$MyAdapter;->this$0:Lcom/teewoo/app/bus/ui/NearbyStationActivity;

    invoke-static {v0}, Lcom/teewoo/app/bus/ui/NearbyStationActivity;->access$0(Lcom/teewoo/app/bus/ui/NearbyStationActivity;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p2

    .end local p2
    check-cast p2, Lcom/teewoo/app/bus/model/Station;

    invoke-virtual {p2}, Lcom/teewoo/app/bus/model/Station;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v11, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 305
    const v0, 0x7f0a0063

    invoke-virtual {v12, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Landroid/widget/TextView;

    .line 306
    .local v8, disView:Landroid/widget/TextView;
    const/4 v9, 0x0

    .line 308
    .local v9, distance:I
    sget-wide v0, Lcom/teewoo/app/bus/ui/Home4StaticMap;->latitude:D

    sget-wide v2, Lcom/teewoo/app/bus/ui/Home4StaticMap;->longitude:D

    iget-object v4, p0, Lcom/teewoo/app/bus/ui/NearbyStationActivity$MyAdapter;->this$0:Lcom/teewoo/app/bus/ui/NearbyStationActivity;

    invoke-static {v4}, Lcom/teewoo/app/bus/ui/NearbyStationActivity;->access$0(Lcom/teewoo/app/bus/ui/NearbyStationActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p2

    check-cast p2, Lcom/teewoo/app/bus/model/Station;

    invoke-virtual {p2}, Lcom/teewoo/app/bus/model/Station;->getLat()D

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v4

    iget-object v6, p0, Lcom/teewoo/app/bus/ui/NearbyStationActivity$MyAdapter;->this$0:Lcom/teewoo/app/bus/ui/NearbyStationActivity;

    invoke-static {v6}, Lcom/teewoo/app/bus/ui/NearbyStationActivity;->access$0(Lcom/teewoo/app/bus/ui/NearbyStationActivity;)Ljava/util/List;

    move-result-object v6

    invoke-interface {v6, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Lcom/teewoo/app/bus/model/Station;

    invoke-virtual {p0}, Lcom/teewoo/app/bus/model/Station;->getLon()D

    move-result-wide v6

    invoke-static {v6, v7}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/Double;->doubleValue()D

    move-result-wide v6

    invoke-static/range {v0 .. v7}, Lcom/teewoo/app/bus/util/Utils;->getDistance(DDDD)I

    move-result v9

    .line 310
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "\u7ea6"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static {v9}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\u7c73"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v9}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    const/high16 v2, -0x1

    invoke-static {v0, v1, v2}, Lcom/teewoo/app/bus/util/Utils;->highlightKeyword(Ljava/lang/String;Ljava/lang/String;I)Landroid/text/SpannableStringBuilder;

    move-result-object v0

    invoke-virtual {v8, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 311
    return-object v12

    .line 298
    .end local v8           #disView:Landroid/widget/TextView;
    .end local v9           #distance:I
    .end local v10           #numView:Landroid/widget/TextView;
    .end local v11           #txView:Landroid/widget/TextView;
    .restart local p0
    .restart local p2
    :cond_0
    move-object v12, p2

    goto/16 :goto_0
.end method
